Existing publish/subscribe (pub/sub) systems generally include publishers, subscribers and pub/sub engines. The publishers are producers of information, and the subscribers are consumers of information. One party of the publishers and the subscribers can or can not know the existence of the other party thereof, i.e., the publishers and the subscribers are in a loose coupling relationship. The pub/sub engines provide functions of storage and forwarding, so as to route between the publishers and subscribers data carrying event information. Typically, the publishers publish event information through event publish application program interfaces, while the subscribers issue subscription requests and receive subscribed information through subscribe application program interfaces.
It is to be noted that in a pub/sub system, the production of data can be pre-estimated while the consumption of data cannot be pre-estimated. Therefore, for a pub/sub system with real-time requirements, it is especially necessary to control subscription requests so that once a subscription request is received, the quality of service QoS with real-time requirements can be ensured.
There exists in the prior art a topic-based pub/sub model, by means of which real-time requirements can be solved to some extent. By means of the topic-based pub/sub model, there is defined how to publish and subscribe to a request to one of content nodes. Each of the content nodes is referred to as a topic. Usually, industry experts build a topic tree in advance based on the content nodes. Topics can be regarded as transmission media of messages, the publishers publish messages to topics, and the subscribers subscribe to requests from topics. The topics make it possible that message subscribers and message publishers keep independent of each other and transfer messages without contact. However, if the publishers of information involve various types of equipments (e.g. in the current Internet of Things) and publish a multitude of information, it is impossible to build complex topic trees, and let alone apply the existing topic-based pub/sub technical solutions.
Content-based pub/sub systems in the prior art are more flexible than the topic-based pub/sub systems. In the content-based pub/sub systems, topic trees do not need to be predefined and publishers do not need to know to which topic node data will be published. The subscribers can receive part of messages of the publishers by defining message content-based filtering rules. Compared with the topic-based pub/sub systems, in the content-based pub/sub systems, the data consumption of each subscriber is more dynamically varying, so that it is more difficult to ensure the quality of service QoS with real-time requirements. However, in the field of Internets of Things, for the purpose of low power consumption, sensors as publishers can only make simple logical computation but cannot perform complex operations. Therefore, the existing content-based pub/sub technical solutions also cannot be applied.
In view of the above, there is still room for improvement in the prior art. Therefore, there is a need to provide a solution for controlling a subscription request, which can be used in a pub/sub engine to improve the quality of service.